package sng.modules.view.components.city.state
{
	import flash.display.MovieClip;
	
	import sng.modules.view.components.city.logic.unit.BaseBuilding;


	/**
	 * 
	 * @author leonliu
	 * 建筑移动状态
	 * 
	 */	
	public class BuildMoveState extends BuildState
	{
		public function BuildMoveState()
		{
		}
		
		public override function setSkin(build:BaseBuilding):void
		{
			var mc:MovieClip = build.skin.getMC();
			try
			{
				if(build.uVO.buildStep==0 || build.uVO.buildStep>build.vo.createStep)
				{
					mc.gotoAndStop(build.currentDirection);				
				}else{				
					mc.gotoAndStop("建造");
					if(mc.baseBuild_mc!=null)
						mc.baseBuild_mc.gotoAndStop("f"+build.currentStep);
				}
			} 
			catch(error:Error) 
			{
				
			}
		}
		
		
		public override function getiStateType():uint
		{
			return 3;
		}
	}
}